﻿/*
 * TransformParameters
 * 
 * initial implementation : 20.11.2008
 *
 * Copyright (c) Adam Sida, asida@centrum.cz.
 * All rights reserved.
 * 
 * for license see Petra.Gis.License.txt
 */
using System;
using System.Runtime.Serialization;
using System.Collections.Generic;

namespace Petra.Gis.ReferenceSystemServices
{

  /// <summary>
  /// set of named parameters used in projection cordinate system and in transformations
  /// to define parameters for projection and transform
  /// </summary>
  //[DataContract]
  public class TransformParameters : Dictionary<string, double>
  {
    
    
    
      public TransformParameters()
        : base() { }





      public TransformParameters(int length)
        : base(length) { }






      public TransformParameters(XParam parameter)
        : base()
      {
        this.Add(parameter.Key, parameter.Value);
      }






    public TransformParameters(params XParam[] parameters)
      : base()
    {

      if (parameters == null)
        throw new ArgumentException("parameters array is null");

      foreach (XParam p in parameters)
        this.Add(p.Key, p.Value);

    }

    //new public void Add(string parKey, double parValue)
    //{
    //  if(!this.ContainsKey(parKey))
    //    base.Add(parKey, parValue);
    //}
    
  }
}
